<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * @property bool $type 钓位类型:1=普通钓位,2=会员钓位
 * @property float $price 价格
 * @property int $deletetime
 * @property int $id
 * @property int $puddle_id 坑位
 * @property int $weigh
 * @property string $createtime
 * @property string $name 钓位
 * @property-read \app\model\Puddle $puddle
 * @property-read \app\model\PuddleOrders[] $orders
 * @property-read \app\model\VipOrders[] $vip_puddle_detail
 * @method static \think\db\Query onlyTrashed()
 * @method static \think\db\Query withTrashed()
 * @mixin \think\Model
 */
class PuddleDetail extends Model
{
	use SoftDelete;
	//
	protected $createTime = 'createtime';
	protected $updateTime = 'updatetime';
	protected $deleteTime = 'deletetime';
	
	function puddle()
	{
		return $this->belongsTo(Puddle::class,'puddle_id');
	}
	
	function orders()
	{
		return $this->hasMany(PuddleOrders::class,'detail_id');
	}
	
	function vipPuddleDetail()
	{
		return $this->hasMany(VipOrders::class,'puddle_detail_id');
	}
}
